﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ITAP.ShprossesBuilder.Modelling.Components;

namespace ITAP.ShprossesBuilder.Modelling.Comparers
{
    public class ComponentXAxisComparer : IComparer<IComponent>
    {
        #region IComparer<IComponent> Members

        public int Compare(IComponent x, IComponent y)
        {
            if (x.Position.X < y.Position.X)
                return -1;
            else if (x.Position.X == y.Position.X)
                return 0;
            else
                return 1;
        }

        #endregion
    }
}
